<?php

    header('Content-Type: text/html; charset=UTF-8');
    include_once '../../config.php';

    mysql_query("SET NAMES 'utf8'");
    mysql_query("SET CHARACTER SET 'utf8'");

    //Variablen
    $client_id  = $_POST['client_nr'];
    $pm_id      = $_POST['pm_id'];
    $pm_name    = $_POST['pm_name'];
    $pm_vorname = $_POST['pm_vorname'];
    $pm_phone   = $_POST['pm_phone'];
    $pm_email   = $_POST['pm_email'];
    $pm_mobil   = $_POST['pm_mobil'];

    if ($pm_name == '') {
        header('Location: ../mainlist.php?list=pm&fail=pmleer');
    } else {
        $sql = "UPDATE project_manager SET name = '" . $pm_name . "', vorname = '" . $pm_vorname . "', phone = '" . $pm_phone . "', "
             . "email = '" .  $pm_email . "', mobil = '" . $pm_mobil . "' WHERE pm_id = " . $pm_id;
        mysql_query($sql);

        header('Location: ../mainlist.php?list=pm');
    }

?>
